package io.rocketman.codec;

import io.rocketman.common.plugin.Plugin;
import io.rocketman.serialize.Serializer;

/**
 * @author He Peng
 * @create 2018-05-27 0:48
 * @update 2018-05-27 0:48
 * @updatedesc : 更新说明
 * @see
 */

@Plugin("rocketman")
public class RocketmanProtocolCodec implements Codec {

    private Serializer serializer;

    @Override
    public byte[] encode(Object obj) {
        byte[] bytes = this.serializer.serialize(obj);
        return bytes;
    }

    @Override
    public <T> T decode(byte[] bytes, Class<T> cls) {
        return null;
    }
}
